Last updated: 2020-08-06

Checks: 7 0

Knit directory: hospital_pt_accessability/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20200708) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 4845f29. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    .drake/
    Ignored:    data/
    Ignored:    doc/
    Ignored:    keys.R

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/lockdown_greenspace.Rmd) and HTML (docs/lockdown_greenspace.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 4845f29 Dennis Wollersheim 2020-08-06 workflowr::wflow_publish(“analysis/lockdown_greenspace.Rmd”)
html 6b8e8ef Dennis Wollersheim 2020-08-06 Build site.
Rmd b7f4db2 Dennis Wollersheim 2020-08-06 wflow_publish(knitr_in(“analysis/lockdown_greenspace.Rmd”), view = TRUE,
html e1388a3 Dennis Wollersheim 2020-08-06 Build site.
Rmd b149e10 Dennis Wollersheim 2020-08-06 workflowr::wflow_publish(“analysis/lockdown_greenspace.Rmd”)
html d123364 Dennis Wollersheim 2020-08-05 Build site.
Rmd c414c9c Dennis Wollersheim 2020-08-05 workflowr::wflow_publish(“analysis/lockdown_greenspace.Rmd”)
html a71385f Dennis Wollersheim 2020-08-05 Build site.
Rmd e4336ca Dennis Wollersheim 2020-08-05 wflow_publish(knitr_in(“analysis/lockdown_greenspace.Rmd”), view = TRUE,
html 269212e Dennis Wollersheim 2020-08-05 Build site.
Rmd f26be26 Dennis Wollersheim 2020-08-05 workflowr::wflow_publish(“analysis/lockdown_greenspace.Rmd”)
html b83cc3d Dennis Wollersheim 2020-08-05 Build site.
html a69a370 Dennis Wollersheim 2020-08-05 Build site.
Rmd cfa232f Dennis Wollersheim 2020-08-05 workflowr::wflow_publish(“analysis/lockdown_greenspace.Rmd”)
html 1b1df89 Dennis Wollersheim 2020-08-05 Build site.
Rmd 0563d42 Dennis Wollersheim 2020-08-05 wflow_publish(knitr_in(“analysis/lockdown_greenspace.Rmd”), view = TRUE,
html 5e8e777 Dennis Wollersheim 2020-08-05 Build site.
Rmd ba8985a Dennis Wollersheim 2020-08-05 workflowr::wflow_publish(“analysis/lockdown_greenspace.Rmd”)

No Parkland Meshblock Summary

  df_mesh_lockdown_summary %>%
    filter(as.numeric(area)==0) %>%
  { . } -> df_none

df_none %>%
  count( MB_CATEGORY_NAME_2016, sort=TRUE) %>%
  gt::gt() %>%
  gt::tab_header(
           title = "Meshblocks with no parks within 5km",
           subtitle = "Number by category"
)
Meshblocks with no parks within 5km
Number by category
MB_CATEGORY_NAME_2016 n
Residential 29
df_none %>%
  select(-starts_with('mc'), -State) %>%
  summarise( across( where(is.numeric),
                    .fns=list(mean=mean, max=max, min=min, sd=sd, total = sum))) %>%
  gt::gt() %>%
gt::tab_header(
               title = "Meshblocks with no parks within 5km",
               subtitle = "Summary statistics"
)
Meshblocks with no parks within 5km
Summary statistics
area_mean area_max area_min area_sd area_total AREA_ALBERS_SQKM_mean AREA_ALBERS_SQKM_max AREA_ALBERS_SQKM_min AREA_ALBERS_SQKM_sd AREA_ALBERS_SQKM_total Dwelling_mean Dwelling_max Dwelling_min Dwelling_sd Dwelling_total Person_mean Person_max Person_min Person_sd Person_total
0 [m^2] 0 [m^2] 0 [m^2] 0 0 [m^2] 0.3056414 3.4271 0.0293 0.6711457 8.8636 41.41379 60 9 12.84389 1201 106.9655 157 14 34.05928 3102

LGA level summary

df_mesh_lockdown_summary  %>%
  group_by(lga_name) %>%
  select(-starts_with('mc'), -State) %>%
  mutate( area = units::set_units( area, 'km^2') ) %>%
  summarise(across(.cols=where(is_numeric),
                   .fns=list(mean=mean, max=max, min=min, sd=sd, total = sum),
                   .names = "{col}.{fn}"), number_mesh_blocks = n(),
            .groups='drop') %>%
  { . } -> df_lga_summary
Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated
df_lga_summary %>%
  gt::gt() %>%
gt::tab_header(
               title = "Lga Summary"
)
Lga Summary
lga_name area.mean area.max area.min area.sd area.total AREA_ALBERS_SQKM.mean AREA_ALBERS_SQKM.max AREA_ALBERS_SQKM.min AREA_ALBERS_SQKM.sd AREA_ALBERS_SQKM.total Dwelling.mean Dwelling.max Dwelling.min Dwelling.sd Dwelling.total Person.mean Person.max Person.min Person.sd Person.total number_mesh_blocks
Banyule 15.185289 [km^2] 17.79422 [km^2] 7.87307193 [km^2] 1.5369448 19270.132 [km^2] 0.036987943 1.3652 0.0037 0.050459776 46.9377 38.83924 137 0 11.95744 49287 94.24586 250 0 32.30976 119598 1269
Bayside 6.219211 [km^2] 10.68724 [km^2] 3.43332336 [km^2] 1.6493926 6181.896 [km^2] 0.027557847 0.1105 0.0037 0.010533698 27.3925 40.28672 370 0 18.28782 40045 95.59960 564 3 36.75206 95026 994
Boroondara 11.191267 [km^2] 16.42813 [km^2] 6.84276928 [km^2] 2.8202078 19562.336 [km^2] 0.026556236 0.1809 0.0015 0.013855586 46.4203 38.61213 312 0 18.74855 67494 92.83810 530 0 37.44842 162281 1748
Brimbank 10.736161 [km^2] 14.63235 [km^2] 4.39925419 [km^2] 2.3418011 18101.168 [km^2] 0.033929893 0.2297 0.0013 0.016238864 57.2058 40.34816 213 0 13.49730 68027 112.89146 377 0 37.48626 190335 1686
Cardinia 3.021159 [km^2] 18.43710 [km^2] 0.00000000 [km^2] 3.2156669 2311.187 [km^2] 0.120625229 10.2854 0.0088 0.429598685 92.2783 38.21830 331 0 20.46497 29237 102.82484 520 0 51.14711 78661 765
Casey 9.052639 [km^2] 28.16408 [km^2] 0.10346466 [km^2] 5.0145369 22332.861 [km^2] 0.064600851 4.3807 0.0065 0.172223090 159.3703 40.25415 584 0 19.44779 99307 118.19497 1563 0 52.74135 291587 2467
Darebin 11.138544 [km^2] 16.27913 [km^2] 8.39442754 [km^2] 2.0232598 17075.388 [km^2] 0.023339400 0.1478 0.0011 0.011839653 35.7793 40.13633 214 0 15.11722 61529 92.23875 479 0 35.09408 141402 1533
Frankston 11.831855 [km^2] 16.12092 [km^2] 3.71528637 [km^2] 2.6173162 17191.685 [km^2] 0.045083551 1.0460 0.0042 0.079356067 65.5064 38.40468 431 0 17.10738 55802 90.47970 693 0 38.25040 131467 1453
Glen Eira 7.832578 [km^2] 11.77597 [km^2] 5.12486060 [km^2] 1.5133682 11874.188 [km^2] 0.021501781 0.0739 0.0023 0.009833396 32.5967 38.71768 303 0 14.34187 58696 90.85488 295 0 32.29669 137736 1516
Greater Dandenong 14.013030 [km^2] 24.86233 [km^2] 2.99986017 [km^2] 3.9685152 19534.164 [km^2] 0.027157461 0.2899 0.0019 0.016519147 37.8575 38.26686 377 0 17.49722 53344 106.07676 524 0 40.70106 147871 1394
Hobsons Bay 10.920534 [km^2] 19.48648 [km^2] 4.46273352 [km^2] 4.5572304 9697.434 [km^2] 0.027201239 0.1503 0.0026 0.010766162 24.1547 41.18131 163 0 13.90562 36569 98.25450 391 0 33.88325 87250 888
Hume 9.426658 [km^2] 20.41986 [km^2] 0.00000000 [km^2] 5.3743911 14884.693 [km^2] 0.055784547 2.7442 0.0034 0.148271405 88.0838 40.67891 265 0 14.43367 64232 119.25902 783 0 45.75360 188310 1579
Kingston 10.591121 [km^2] 15.24164 [km^2] 7.11436661 [km^2] 1.8220434 17380.030 [km^2] 0.025631140 0.3020 0.0029 0.013375572 42.0607 37.54966 222 0 15.12078 61619 89.49482 369 8 34.17293 146861 1641
Knox 16.248975 [km^2] 29.50606 [km^2] 7.81893385 [km^2] 5.7690297 22634.822 [km^2] 0.043232161 0.5604 0.0031 0.029689784 60.2224 41.66475 216 0 16.86122 58039 108.34314 418 0 38.80162 150922 1393
Manningham 13.022915 [km^2] 18.87721 [km^2] 5.32729042 [km^2] 4.0142667 14442.413 [km^2] 0.052050135 0.4655 0.0024 0.052534972 57.7236 39.30929 333 0 16.69148 43594 100.19748 442 0 33.69702 111119 1109
Maribyrnong 9.216707 [km^2] 11.67654 [km^2] 7.64732478 [km^2] 0.7592285 7751.251 [km^2] 0.018892033 0.1250 0.0018 0.010196186 15.8882 40.98811 372 0 22.41438 34471 94.85375 625 0 43.66590 79772 841
Maroondah 6.784671 [km^2] 17.95823 [km^2] 4.76147480 [km^2] 1.8258573 7700.602 [km^2] 0.040433040 0.7314 0.0054 0.031928654 45.8915 38.78502 359 8 15.12772 44021 96.07577 428 18 36.11853 109046 1135
Melbourne 13.917569 [km^2] 17.83142 [km^2] 7.19365050 [km^2] 2.3036747 9157.760 [km^2] 0.010052888 0.3884 0.0005 0.016267494 6.6148 81.43313 820 0 104.64713 53583 143.93161 1420 0 171.52913 94707 658
Melton 5.845543 [km^2] 13.39463 [km^2] 0.02024515 [km^2] 2.2614614 6710.683 [km^2] 0.063486760 4.6791 0.0044 0.231159116 72.8828 39.23258 265 0 16.03247 45039 113.58624 1145 0 53.47677 130397 1148
Monash 10.658986 [km^2] 24.90446 [km^2] 5.44214681 [km^2] 3.6826422 18685.202 [km^2] 0.031278779 0.1692 0.0024 0.012689424 54.8317 39.50314 314 0 16.44179 69249 100.89218 554 0 35.75911 176864 1753
Moonee Valley 10.867900 [km^2] 12.87149 [km^2] 8.41506036 [km^2] 1.0230332 12671.972 [km^2] 0.025014151 0.1251 0.0013 0.012249724 29.1665 41.37564 789 0 28.02625 48244 96.42882 1490 0 57.08910 112436 1166
Moreland 10.982315 [km^2] 14.61052 [km^2] 8.08687463 [km^2] 1.2519347 17890.191 [km^2] 0.022397790 0.1207 0.0015 0.011369870 36.4860 42.03131 443 0 23.08106 68469 96.70043 678 0 42.10126 157525 1629
Mornington Peninsula 5.251301 [km^2] 15.17988 [km^2] 0.44753341 [km^2] 2.6990688 11726.155 [km^2] 0.068692611 3.6804 0.0047 0.126870661 153.3906 37.65607 552 0 18.34183 84086 64.69727 763 0 45.99725 144469 2233
Nillumbik 9.363364 [km^2] 17.03398 [km^2] 0.00000000 [km^2] 4.3935067 4419.508 [km^2] 0.093530720 1.1567 0.0099 0.126969096 44.1465 38.16102 71 3 11.84666 18012 107.47034 232 10 37.63969 50726 472
Port Phillip 9.471658 [km^2] 12.89079 [km^2] 5.54027647 [km^2] 1.7034196 11119.726 [km^2] 0.009634923 0.0488 0.0010 0.005850779 11.3114 44.46934 364 0 32.21854 52207 78.28705 565 0 50.96849 91909 1174
Stonnington 10.377284 [km^2] 14.77288 [km^2] 6.45121772 [km^2] 2.5691104 12463.118 [km^2] 0.016405995 0.1043 0.0009 0.012034248 19.7036 40.01166 443 0 26.55481 48054 78.45545 709 0 45.18010 94225 1201
Whitehorse 8.645928 [km^2] 14.20004 [km^2] 6.38896615 [km^2] 1.3822301 13798.901 [km^2] 0.030590038 0.2579 0.0010 0.014826582 48.8217 40.58459 216 0 16.41082 64773 99.53195 488 0 36.70984 158853 1596
Whittlesea 9.383794 [km^2] 21.11696 [km^2] 1.19949349 [km^2] 3.6457455 16477.943 [km^2] 0.046959738 6.4906 0.0058 0.173330437 82.4613 38.80011 424 0 18.67791 68133 108.57289 783 0 45.04374 190654 1756
Wyndham 8.283654 [km^2] 29.92811 [km^2] 0.12219149 [km^2] 5.5221152 15581.553 [km^2] 0.055817863 7.8791 0.0073 0.299822653 104.9934 39.24349 279 0 15.62235 73817 113.46146 1070 0 48.84813 213421 1881
Yarra 16.158732 [km^2] 17.84010 [km^2] 13.27009926 [km^2] 1.0648759 13880.351 [km^2] 0.011739814 0.1022 0.0013 0.007821915 10.0845 47.14785 576 0 48.07148 40500 92.83818 841 0 84.53188 79748 859
Yarra Ranges 13.876811 [km^2] 59.04844 [km^2] 0.00000000 [km^2] 10.0935565 17498.658 [km^2] 0.107572958 1.8395 0.0056 0.139485038 135.6495 40.09040 279 3 14.56882 50554 101.58921 448 7 35.98934 128104 1261
df_mesh_lockdown_summary  %>%
  write_csv('output/lockdown_greenspace_mesh_detail.csv')

df_lga_summary %>%
  write_csv('output/lockdown_greenspace_lga_summary.csv')

SA2 level summary

df_mesh_lockdown_summary  %>%
  group_by(SA2_MAIN16) %>%
  select(-starts_with('mc'), -State) %>%
  mutate( area = units::set_units( area, 'km^2') ) %>%
  summarise(across(.cols=where(is_numeric),
                   .fns=list(mean=mean, max=max, min=min, sd=sd, total = sum),
                   .names = "{col}.{fn}"), number_mesh_blocks = n(),
            .groups='drop') %>%
  { . } -> df_sa2_summary
Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated
df_sa2_summary %>%
  head(10) %>%
  gt::gt() %>%
gt::tab_header(
               title = "SA2 Summary",
               subtitle = "First 10 rows"
)
SA2 Summary
First 10 rows
SA2_MAIN16 area.mean area.max area.min area.sd area.total AREA_ALBERS_SQKM.mean AREA_ALBERS_SQKM.max AREA_ALBERS_SQKM.min AREA_ALBERS_SQKM.sd AREA_ALBERS_SQKM.total Dwelling.mean Dwelling.max Dwelling.min Dwelling.sd Dwelling.total Person.mean Person.max Person.min Person.sd Person.total number_mesh_blocks
204011061 42.13817 [km^2] 59.04844 [km^2] 11.999212 [km^2] 26.1659374 126.4145 [km^2] 0.23680000 0.4042 0.0977 0.155197390 0.7104 17.00000 23 10 6.557439 51 28.00000 37 16 10.81665 84 3
206011105 11.22203 [km^2] 13.82834 [km^2] 10.181837 [km^2] 0.8463643 2928.9494 [km^2] 0.01345326 0.0351 0.0015 0.006225212 3.5113 42.68199 177 5 22.246746 11140 88.89655 345 7 40.75226 23202 261
206011106 12.72169 [km^2] 14.34703 [km^2] 10.897082 [km^2] 0.9692451 1475.7163 [km^2] 0.01409828 0.0370 0.0017 0.006733059 1.6354 48.14655 443 0 56.793639 5585 93.51724 678 4 81.06857 10848 116
206011107 11.56507 [km^2] 12.14974 [km^2] 10.788757 [km^2] 0.3132748 1873.5407 [km^2] 0.01666852 0.0531 0.0015 0.008884808 2.7003 40.65432 217 10 19.390182 6586 82.62346 385 15 38.58459 13385 162
206011108 10.43298 [km^2] 11.68780 [km^2] 8.086875 [km^2] 0.6856222 2639.5436 [km^2] 0.02256957 0.0946 0.0027 0.009758878 5.7101 42.08696 241 0 19.585596 10648 101.04743 394 0 38.73718 25565 253
206011109 10.75059 [km^2] 11.88591 [km^2] 9.542034 [km^2] 0.6560649 935.3017 [km^2] 0.02919425 0.0508 0.0081 0.008556411 2.5399 42.85057 72 17 11.069053 3728 111.44828 217 24 33.06363 9696 87
206021110 13.80918 [km^2] 15.52856 [km^2] 11.967993 [km^2] 1.0753853 1394.7270 [km^2] 0.02071881 0.0452 0.0057 0.008669299 2.0926 38.26733 75 13 11.290608 3865 87.00000 193 32 28.69286 8787 101
206021111 14.03233 [km^2] 16.39193 [km^2] 12.154639 [km^2] 0.8716260 3830.8253 [km^2] 0.01700879 0.0604 0.0017 0.007729779 4.6434 38.27106 134 3 15.577362 10448 86.81319 248 7 36.36293 23700 273
206021112 12.03072 [km^2] 14.96160 [km^2] 10.346722 [km^2] 0.9405670 2610.6660 [km^2] 0.01750968 0.0444 0.0026 0.007826259 3.7996 38.51613 98 11 11.424915 8358 82.70046 257 19 31.50966 17946 217
206031113 11.03825 [km^2] 11.66311 [km^2] 10.025369 [km^2] 0.3607965 1600.5467 [km^2] 0.01984138 0.0606 0.0025 0.009725815 2.8770 43.61379 210 12 23.884614 6324 96.86207 451 36 47.87623 14045 145
df_sa2_summary %>%
  write_csv('output/lockdown_greenspace_sa2_summary.csv')

SA1 level summary

df_mesh_lockdown_summary  %>%
  group_by(SA1_MAIN16) %>%
  select(-starts_with('mc'), -State) %>%
  mutate( area = units::set_units( area, 'km^2') ) %>%
  summarise(across(.cols=where(is_numeric),
                   .fns=list(mean=mean, max=max, min=min, sd=sd, total = sum),
                   .names = "{col}.{fn}"), number_mesh_blocks = n(),
            .groups='drop') %>%
  { . } -> df_sa1_summary
Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated

Warning: Deprecated
df_sa1_summary %>%
  head(10) %>%
  gt::gt() %>%
  gt::tab_header(
                 title = "SA1 Summary",
                 subtitle = "First 10 rows"
  )
SA1 Summary
First 10 rows
SA1_MAIN16 area.mean area.max area.min area.sd area.total AREA_ALBERS_SQKM.mean AREA_ALBERS_SQKM.max AREA_ALBERS_SQKM.min AREA_ALBERS_SQKM.sd AREA_ALBERS_SQKM.total Dwelling.mean Dwelling.max Dwelling.min Dwelling.sd Dwelling.total Person.mean Person.max Person.min Person.sd Person.total number_mesh_blocks
8.265415 [km^2] 8.265415 [km^2] 8.265415 [km^2] NA 8.265415 [km^2] 0.0266000 0.0266 0.0266 NA 0.0266 48.00 48 48 NA 48 83.0000 83 83 NA 83 1
20401106101 42.138174 [km^2] 59.048443 [km^2] 11.999212 [km^2] 26.16593741 126.414522 [km^2] 0.2368000 0.4042 0.0977 0.155197390 0.7104 17.00 23 10 6.557439 51 28.0000 37 16 10.816654 84 3
20601110501 10.761375 [km^2] 10.796213 [km^2] 10.726537 [km^2] 0.04926838 21.522749 [km^2] 0.0205000 0.0229 0.0181 0.003394113 0.0410 54.50 59 50 6.363961 109 109.5000 115 104 7.778175 219 2
20601110502 10.406138 [km^2] 10.504986 [km^2] 10.327990 [km^2] 0.05991859 83.249102 [km^2] 0.0129125 0.0214 0.0050 0.005480729 0.1033 30.75 40 15 7.535630 246 72.7500 106 44 23.407874 582 8
20601110503 10.643974 [km^2] 10.732194 [km^2] 10.564890 [km^2] 0.06359407 53.219871 [km^2] 0.0124400 0.0174 0.0096 0.002926260 0.0622 38.00 53 27 9.643651 190 89.6000 154 69 36.239481 448 5
20601110504 11.122997 [km^2] 11.245029 [km^2] 11.037630 [km^2] 0.10845205 33.368992 [km^2] 0.0168000 0.0226 0.0094 0.006743886 0.0504 45.00 52 38 7.000000 135 100.3333 138 60 39.068316 301 3
20601110505 10.736944 [km^2] 10.902372 [km^2] 10.589545 [km^2] 0.12858726 42.947776 [km^2] 0.0171250 0.0218 0.0121 0.004618351 0.0685 40.50 50 30 9.146948 162 89.0000 113 60 21.924112 356 4
20601110506 10.401720 [km^2] 10.540552 [km^2] 10.293592 [km^2] 0.09496873 52.008602 [km^2] 0.0139600 0.0188 0.0073 0.004723135 0.0698 34.20 51 25 10.034939 171 78.4000 92 55 14.135063 392 5
20601110507 10.751806 [km^2] 10.966954 [km^2] 10.582393 [km^2] 0.16113143 53.759029 [km^2] 0.0165800 0.0236 0.0089 0.006171467 0.0829 46.20 59 34 9.418068 231 100.0000 130 69 26.804850 500 5
20601110508 11.406475 [km^2] 11.671566 [km^2] 11.145402 [km^2] 0.21835673 57.032376 [km^2] 0.0125000 0.0165 0.0086 0.003248846 0.0625 39.80 53 23 10.825895 199 75.8000 86 54 13.084342 379 5
df_sa1_summary %>%
  write_csv('output/lockdown_greenspace_sa1_summary.csv')

Map

map_sa1 %>%
  inner_join(df_sa1_summary, by = "SA1_MAIN16" ) %>%
  mutate( area.mean = area.mean %>% as.numeric() ) %>%
  ggplot() +
  geom_sf( aes( fill = area.mean ),lwd=0 ) +
  scale_fill_viridis_c(option = "plasma") +
  ggtitle('Km^2 greenspace access within 5km of meshblock average for SA1')

Version Author Date
e1388a3 Dennis Wollersheim 2020-08-06
a71385f Dennis Wollersheim 2020-08-05
b83cc3d Dennis Wollersheim 2020-08-05
1b1df89 Dennis Wollersheim 2020-08-05
map_sa2 %>%
  inner_join(df_sa2_summary, by = "SA2_MAIN16" ) %>%
  mutate( area.mean = area.mean %>% as.numeric() ) %>%
  ggplot() +
  geom_sf( aes( fill = area.mean ),lwd=0 ) +
  scale_fill_viridis_c(option = "plasma") +
  ggtitle('Km^2 greenspace access within 5km of meshblock average for SA2')

Version Author Date
e1388a3 Dennis Wollersheim 2020-08-06

Green Map

map_mesh %>%
  inner_join(df_mesh_lockdown_summary_parks, by = "MB_CODE16" ) %>%
  { . } -> df_parks

map_sa1 %>%
  inner_join(df_sa1_summary, by = "SA1_MAIN16" ) %>%
  mutate( area.mean = area.mean %>% as.numeric() ) %>%
  ggplot() +
  geom_sf( aes( fill = area.mean ),lwd=0 ) +
  geom_sf(data=df_parks, fill=RColorBrewer::brewer.pal(3,'Greens')[2]) +
  scale_fill_viridis_c(option = "plasma") +
  ggtitle('Km^2 greenspace access within 5km of meshblock. Green is parks')

Version Author Date
e1388a3 Dennis Wollersheim 2020-08-06
a71385f Dennis Wollersheim 2020-08-05
b83cc3d Dennis Wollersheim 2020-08-05
a69a370 Dennis Wollersheim 2020-08-05
1b1df89 Dennis Wollersheim 2020-08-05
map_sa2 %>%
  inner_join(df_sa2_summary, by = "SA2_MAIN16" ) %>%
  mutate( area.mean = area.mean %>% as.numeric() ) %>%
  ggplot() +
  geom_sf( aes( fill = area.mean ),lwd=0 ) +
  geom_sf(data=df_parks, fill=RColorBrewer::brewer.pal(3,'Greens')[2]) +
  scale_fill_viridis_c(option = "plasma") +
  ggtitle('Km^2 greenspace access within 5km of meshblock. Green is parks')

Version Author Date
e1388a3 Dennis Wollersheim 2020-08-06

Interactive Map SA2 level

map_levels = c('0-5km^2', '5-10km^2', '10-15km^2','15-20km^2','>20km^2')
map_colors = RColorBrewer::brewer.pal(6,'YlOrRd')[2:6]
map_palette = colorFactor(map_colors, levels=map_levels)

map_sa2 %>%
  inner_join(df_sa2_summary, by = "SA2_MAIN16" ) %>%
  mutate( area.mean = area.mean %>% as.numeric() ) %>%
  mutate( area_factor = cut( area.mean, breaks= c(0, 5,10,15,20,99),
                            labels= map_levels )) %>%
  { . } -> df_leaflet


df_leaflet %>%
  leaflet() %>%
  addPolygons(stroke = FALSE, smoothFactor = 0.2, fillOpacity = 1,
              color = ~map_palette(area_factor)) %>%
  addLegend("bottomright", pal = map_palette, values = ~area_factor,
            title = "Mean park area within 5km circle of mesh blocks within SA2",
            opacity = 1
            ) %>%
  addPolygons( weight = .5, smoothFactor = 0.5,
              opacity = .5, fillOpacity = 0.0,
              data = map_lga) %>%
  addPolygons( weight = 1, smoothFactor = 0.5,
              opacity = 1, fillOpacity = 1,
              color = RColorBrewer::brewer.pal(3,'Greens')[2],
              data = df_parks)
Warning: sf layer has inconsistent datum (+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ).
Need '+proj=longlat +datum=WGS84'

Warning: sf layer has inconsistent datum (+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ).
Need '+proj=longlat +datum=WGS84'

Warning: sf layer has inconsistent datum (+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ).
Need '+proj=longlat +datum=WGS84'

Interactive Map SA1 level

map_levels = c('0-5km^2', '5-10km^2', '10-15km^2','15-20km^2','>20km^2')
map_colors = RColorBrewer::brewer.pal(6,'YlOrRd')[2:6]
map_palette = colorFactor(map_colors, levels=map_levels)

map_sa1 %>%
  inner_join(df_sa1_summary, by = "SA1_MAIN16" ) %>%
  mutate( area.mean = area.mean %>% as.numeric() ) %>%
  mutate( area_factor = cut( area.mean, breaks= c(0, 5,10,15,20,99),
                            labels= map_levels )) %>%
  { . } -> df_leaflet


df_leaflet %>%
  leaflet() %>%
  addPolygons(stroke = FALSE, smoothFactor = 0.2, fillOpacity = 1,
              color = ~map_palette(area_factor)) %>%
  addLegend("bottomright", pal = map_palette, values = ~area_factor,
            title = "Mean park area within 5km circle of mesh blocks within SA2",
            opacity = 1
  ) %>%
  addPolygons( weight = .5, smoothFactor = 0.5,
              opacity = .5, fillOpacity = 0.0,
              data = map_lga) %>%
  addPolygons( weight = 1, smoothFactor = 0.5,
              opacity = 1, fillOpacity = 1,
              color = RColorBrewer::brewer.pal(3,'Greens')[2],
              data = df_parks)
Warning: sf layer has inconsistent datum (+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ).
Need '+proj=longlat +datum=WGS84'

Warning: sf layer has inconsistent datum (+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ).
Need '+proj=longlat +datum=WGS84'

Warning: sf layer has inconsistent datum (+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs ).
Need '+proj=longlat +datum=WGS84'

sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.2.20.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] rvest_0.3.5        xml2_1.3.2         leaflet_2.0.3.9000 workflowr_1.6.2   
 [5] cleangeo_0.2-3     maptools_1.0-1     rgeos_0.5-3        sp_1.4-2          
 [9] geohash_0.4.0      osrm_3.3.3         sf_0.9-3           janitor_2.0.1     
[13] rmarkdown_2.1      lubridate_1.7.8    geosphere_1.5-10   forcats_0.5.0     
[17] stringr_1.4.0      dplyr_1.0.0        purrr_0.3.4        readr_1.3.1       
[21] tidyr_1.1.0        tibble_3.0.3       ggplot2_3.3.2      tidyverse_1.3.0   
[25] drake_7.12.4       dotenv_1.0.2       conflicted_1.0.4   nvimcom_0.9-99    

loaded via a namespace (and not attached):
 [1] nlme_3.1-147       fs_1.4.1           RColorBrewer_1.1-2 filelock_1.0.2    
 [5] progress_1.2.2     httr_1.4.1         rprojroot_1.3-2    tools_4.0.2       
 [9] backports_1.1.8    R6_2.4.1           KernSmooth_2.23-17 DBI_1.1.0         
[13] colorspace_1.4-1   withr_2.2.0        tidyselect_1.1.0   prettyunits_1.1.1 
[17] compiler_4.0.2     git2r_0.27.1       Xmisc_0.2.1        cli_2.0.2         
[21] gt_0.2.1           labeling_0.3       sass_0.2.0         checkmate_2.0.0   
[25] scales_1.1.1       classInt_0.4-3     digest_0.6.25      foreign_0.8-79    
[29] txtq_0.2.3         pkgconfig_2.0.3    htmltools_0.5.0    dbplyr_1.4.3      
[33] htmlwidgets_1.5.1  rlang_0.4.7        readxl_1.3.1       rstudioapi_0.11   
[37] farver_2.0.3       generics_0.0.2     jsonlite_1.7.0     crosstalk_1.1.0.1 
[41] magrittr_1.5       Rcpp_1.0.5         munsell_0.5.0      fansi_0.4.1       
[45] lifecycle_0.2.0    stringi_1.4.6      whisker_0.4        yaml_2.2.1        
[49] snakecase_0.11.0   storr_1.2.1        grid_4.0.2         parallel_4.0.2    
[53] promises_1.1.1     crayon_1.3.4       lattice_0.20-41    haven_2.2.0       
[57] hms_0.5.3          knitr_1.28         pillar_1.4.6       igraph_1.2.5      
[61] base64url_1.4      reprex_0.3.0       glue_1.4.1         evaluate_0.14     
[65] modelr_0.1.7       vctrs_0.3.2        httpuv_1.5.4       cellranger_1.1.0  
[69] gtable_0.3.0       assertthat_0.2.1   xfun_0.16          broom_0.5.6       
[73] e1071_1.7-3        later_1.1.0.1      viridisLite_0.3.0  class_7.3-17      
[77] memoise_1.1.0      units_0.6-6        ellipsis_0.3.1